How can I get a string[] of all different values of a list?
Posted
by iTayb
on Stack Overflow
See other posts from Stack Overflow
or by iTayb
Published on 2010-03-25T12:41:32Z
Indexed on
2010/03/25
12:43 UTC
Read the original article
Hit count: 239
c#
I have a class that has an list<Book>
in it, and those Book
objects has many many properties.
string Subject
is one of those properties.
I'd like to get an string[]
type value that will include all different subjects from all over the list.
Is there an elegant way to do it, or I'll have to scan the whole list and enter each subject to it, then remove duplicates?
© Stack Overflow or respective owner